import request from "@/utils/request";

export function getClassList(params: any) {
    return request({
        url: `/api/class/list`,
        method: 'get',
        params: params
    });
}

export function getClassById(id: any) {
    return request({
        url: `/api/class/getClassInfo/${id}`,
        method: 'get',
    });
}

export function addClass(data: any) {
    return request({
        url: `/api/class/createClass`,
        method: 'post',
        data: data
    });
}

export function updateClass(data:any) {
    return request({
        url: `/api/class/updateClassInfo`,
        method: 'put',
        data: data
    });
}

export function deleteClass(id: any) {
    return request({
        url: `/api/class/${id}`,
        method: 'delete',
    });
}
